home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / HyperXCmd.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  4.9 KB  |  148 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        HyperXCmd.a
  3. ;
  4. ;    Contains:    Interfaces for HyperCard XCMD's
  5. ;
  6. ;    Version:    Technology:    HyperCard 2.3
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1987-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__HYPERXCMD__') = 'UNDEFINED' THEN
  18. __HYPERXCMD__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__FP__') = 'UNDEFINED' THEN
  24.     include 'fp.a'
  25.     ENDIF
  26.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  27.     include 'Events.a'
  28.     ENDIF
  29.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  30.     include 'TextEdit.a'
  31.     ENDIF
  32.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  33.     include 'Menus.a'
  34.     ENDIF
  35.     IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
  36.     include 'StandardFile.a'
  37.     ENDIF
  38.  
  39. ;  result codes 
  40.  
  41. xresSucc                        EQU        0
  42. xresFail                        EQU        1
  43. xresNotImp                        EQU        2
  44. ;  XCMDBlock constants for event.what... 
  45.  
  46. xOpenEvt                        EQU        1000                ; the first event after you are created 
  47. xCloseEvt                        EQU        1001                ; your window is being forced close (Quit?) 
  48. xGiveUpEditEvt                    EQU        1002                ; you are losing Edit... 
  49. xGiveUpSoundEvt                    EQU        1003                ; you are losing the sound channel... 
  50. xHidePalettesEvt                EQU        1004                ; someone called HideHCPalettes 
  51. xShowPalettesEvt                EQU        1005                ; someone called ShowHCPalettes 
  52. xEditUndo                        EQU        1100                ; Edit——Undo 
  53. xEditCut                        EQU        1102                ; Edit——Cut 
  54. xEditCopy                        EQU        1103                ; Edit——Copy 
  55. xEditPaste                        EQU        1104                ; Edit——Paste 
  56. xEditClear                        EQU        1105                ; Edit——Clear 
  57. xSendEvt                        EQU        1200                ; script has sent you a message (text) 
  58. xSetPropEvt                        EQU        1201                ; set a window property 
  59. xGetPropEvt                        EQU        1202                ; get a window property 
  60. xCursorWithin                    EQU        1300                ; cursor is within the window 
  61. xMenuEvt                        EQU        1400                ; user has selected an item in your menu 
  62. xMBarClickedEvt                    EQU        1401                ; a menu is about to be shown--update if needed 
  63. xShowWatchInfoEvt                EQU        1501                ; for variable and message watchers 
  64. xScriptErrorEvt                    EQU        1502                ; place the insertion point 
  65. xDebugErrorEvt                    EQU        1503                ; user clicked "Debug" at a complaint 
  66. xDebugStepEvt                    EQU        1504                ; hilite the line 
  67. xDebugTraceEvt                    EQU        1505                ; same as step but tracing 
  68. xDebugFinishedEvt                EQU        1506                ; script ended 
  69.  
  70. paletteProc                        EQU        2048                ; Windoid with grow box 
  71. palNoGrowProc                    EQU        2052                ; standard Windoid defproc 
  72. palZoomProc                        EQU        2056                ; Windoid with zoom and grow 
  73. palZoomNoGrow                    EQU        2060                ; Windoid with zoom and no grow 
  74.  
  75. hasZoom                            EQU        8
  76. hasTallTBar                        EQU        2
  77. toggleHilite                    EQU        1
  78. ;  paramCount is set to these constants when first calling special XThings 
  79.  
  80. xMessageWatcherID                EQU        -2
  81. xVariableWatcherID                EQU        -3
  82. xScriptEditorID                    EQU        -4
  83. xDebuggerID                        EQU        -5
  84. ;  XTalkObjectPtr->objectKind values 
  85.  
  86. stackObj                        EQU        1
  87. bkgndObj                        EQU        2
  88. cardObj                            EQU        3
  89. fieldObj                        EQU        4
  90. buttonObj                        EQU        5
  91. ;  selectors for ShowHCAlert's dialogs (shown as buttonID:buttonText) 
  92.  
  93. errorDlgID                        EQU        1                    ; 1:OK (default) 
  94. confirmDlgID                    EQU        2                    ; 1:OK (default) and 2:Cancel 
  95. confirmDelDlgID                    EQU        3                    ; 1:Cancel (default) and 2:Delete 
  96. yesNoCancelDlgID                EQU        4                    ; 1:Yes (default), 2:Cancel, and 3:No 
  97.  
  98. ;  type definitions 
  99. XCmdBlock                RECORD 0
  100. paramCount                 ds.w    1                ; offset: $0 (0)        ;  If = -1 then new use for XWindoids 
  101. params                     ds.l    16                ; offset: $2 (2)
  102. returnValue                 ds.l    1                ; offset: $42 (66)
  103. passFlag                 ds.b    1                ; offset: $46 (70)
  104. filler1                     ds.b    1                ; offset: $47 (71)
  105. entryPoint                 ds.l    1                ; offset: $48 (72)        ;  to call back to HyperCard 
  106. request                     ds.w    1                ; offset: $4C (76)
  107. result                     ds.w    1                ; offset: $4E (78)
  108. inArgs                     ds.l    8                ; offset: $50 (80)
  109. outArgs                     ds.l    4                ; offset: $70 (112)
  110. sizeof                     EQU *                    ; size:   $80 (128)
  111.                         ENDR
  112. ; typedef struct XCmdBlock *            XCmdPtr
  113.  
  114.  
  115. XWEventInfo                RECORD 0
  116. event                     ds        EventRecord        ; offset: $0 (0)
  117. eventWindow                 ds.l    1                ; offset: $10 (16)
  118. eventParams                 ds.l    9                ; offset: $14 (20)
  119. eventResult                 ds.l    1                ; offset: $38 (56)
  120. sizeof                     EQU *                    ; size:   $3C (60)
  121.                         ENDR
  122. ; typedef struct XWEventInfo *            XWEventInfoPtr
  123.  
  124. XTalkObject                RECORD 0
  125. objectKind                 ds.w    1                ; offset: $0 (0)        ;  stack, bkgnd, card, field, or button 
  126. stackNum                 ds.l    1                ; offset: $2 (2)        ;  reference number of the source stack 
  127. bkgndID                     ds.l    1                ; offset: $6 (6)
  128. cardID                     ds.l    1                ; offset: $A (10)
  129. buttonID                 ds.l    1                ; offset: $E (14)
  130. fieldID                     ds.l    1                ; offset: $12 (18)
  131. sizeof                     EQU *                    ; size:   $16 (22)
  132.                         ENDR
  133. ; typedef struct XTalkObject *            XTalkObjectPtr
  134.  
  135. ;  maximum number of checkpoints in a script 
  136.  
  137. maxCachedChecks                    EQU        16
  138. CheckPts                RECORD 0
  139. checks                     ds.w    16                ; offset: $0 (0)
  140. sizeof                     EQU *                    ; size:   $20 (32)
  141.                         ENDR
  142. ; typedef struct CheckPts *                CheckPtPtr
  143.  
  144. ; typedef CheckPtPtr *                    CheckPtHandle
  145.  
  146.     ENDIF ; __HYPERXCMD__ 
  147.  
  148.